You are here: Trading System Programming > Reference > Classes > TechnicalAnalysis > TechnicalAnalysis Methods > ULTOSC

ULTOSC

This method calculates the Ultimate Oscillator.

 

Syntax

var ULTOSC(period1, period2, period3, highPricesArray, lowPricesArray, closePricesArray, calculatedDataArray);

Parameters

period1

First period integer value.

 

period2

Second period integer value.

 

period3

Third period integer value.

 

highPricesArray

Array object filled with high prices.

 

lowPricesArray

Array object filled with low prices.

 

closePricesArray

Array object filled with close prices.

 

calculatedDataArray

Empty Array object that will be filled with calculated data.

Return Value

Returns true if calculation was completed successfully, or false otherwise.

Example

The following example demonstrates how to use ULTOSC method.

 

function calculate(beginIndex, endIndex)

{

var period1 = 5;

var period2 = 10;

var period3 = 20;

 

var highPricesArray = new Array();

var lowPricesArray = new Array();

var closePricesArray = new Array();

 

//populate arrays..

..

..

..

 

var calculatedDataArray = new Array();

 

var rc = TechnicalAnalysis.ULTOSC(period1, period2, period3, highPricesArray, lowPricesArray,

closePricesArray, calculatedDataArray);

}

 

 


Copyright © 2006-2009 ActiveTick LLC